Skip to content

ios notif [nfc]: Simplify out some redundant logic #5252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 19, 2022

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Feb 19, 2022

It's true that another iOS notifications library might have a
different interface in this respect. But if someday in the future we
switch to a different iOS notifications library with a different
interface, we'll be updating this code for the new set of expectations
in any case -- there's no gain from attempting to accommodate in
today's code one of the many possible ways the interface could differ.

Moreover, as far as this particular point of the interface is
concerned… none of the subsequent code actually notices or cares
whether there's an aps property on the object. It takes the zulip
property, and does nothing with the rest of the object. So going and
removing an aps property first has no meaningful effect.

@gnprice gnprice changed the title Pr notif extract ios notif [nfc]: Simplify out some redundant logic Feb 19, 2022
@chrisbobbe
Copy link
Contributor

Great! LGTM; please merge at will.

It's true that another iOS notifications library might have a
different interface in this respect.  But if someday in the future we
switch to a different iOS notifications library with a different
interface, we'll be updating this code for the new set of expectations
in any case -- there's no gain from attempting to accommodate in
today's code one of the many possible ways the interface could differ.

Moreover, as far as this particular point of the interface is
concerned… none of the subsequent code actually notices or cares
whether there's an `aps` property on the object.  It takes the `zulip`
property, and does nothing with the rest of the object.  So going and
removing an `aps` property first has no meaningful effect.
@gnprice gnprice merged commit 5a14868 into zulip:main Feb 19, 2022
@gnprice gnprice deleted the pr-notif-extract branch February 19, 2022 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants